package cn.tedu.lucky.draw.server.repository;

import cn.tedu.lucky.draw.server.protocol.po.Rule;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface RuleRepository extends JpaRepository<Rule,Long> {

    //根据状态查询规则列表
    List<Rule> findByStatus(Integer status);

    //根据Id集合和规则状态进行搜索
    List<Rule> findByIdNotInAndStatus(List<Long> ids,Integer status);
}
